package com.harry.hr.utils;

import java.util.Date;

import javax.servlet.ServletException;

import org.apache.commons.beanutils.ConvertUtils;
import org.apache.struts.action.ActionServlet;
import org.apache.struts.action.PlugIn;

import org.apache.struts.config.ModuleConfig;



public class ConvertPlugIn implements PlugIn {

	public void destroy() {
		ConvertUtils.deregister();
	}

	public void init(ActionServlet actionServlet, ModuleConfig moduleConfig)
			throws ServletException {
		//actionServlet.getServletContext().setAttribute("CreateNum", new CreateNum());
		ConvertUtils.register(new DateConverter(),Date.class);
	}

}
